// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   JobtypeTreeCellRenderer.java

package nc.ui.bd.b36;

import java.awt.Component;
import javax.swing.JTree;
import javax.swing.tree.DefaultTreeCellRenderer;
import nc.ui.trade.pub.VOTreeNode;
import nc.vo.bd.b36.JobtypeVO;

public class JobtypeTreeCellRenderer extends DefaultTreeCellRenderer
{

	private static final long serialVersionUID = 0x74a5603e785bb5ffL;

	public JobtypeTreeCellRenderer()
	{
	}

	public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)
	{
		Component obj = super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
		if (value instanceof VOTreeNode)
		{
			JobtypeVO val = (JobtypeVO)((VOTreeNode)value).getData();
			if (val != null)
				setText((new StringBuilder()).append(val.getJobtypecode()).append(" ").append(val.getJobtypename()).toString());
		}
		return obj;
	}
}
